import java.util.Scanner;

public class test2 {
    //作业
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        getLucky(n);
    }

    private static void getLucky(int n) {
        for (int i = 1; i < n; i++) {
            if (i % 3 == 0 || i % 5 == 0) {
                continue;
            }
            if (i % 7 == 0) {
                System.out.println("Lucky");
                continue;
            }
            System.out.println(i);
        }
    }
}
